Export af (not MAF) in top_loci; add medianAbsCorr; PIP screen after harmonization#530
Merged
danielnachun merged 3 commits intoJun 23, 2026
Merged
Conversation
…harmonization top_loci now exports the effect-allele frequency as an af column instead of MAF, and the GwasSumStats/QtlSumStats methods actually wire the QC'd entry frequency into it (it was never passed before, so the old MAF column was always NA). af is the harmonized, complemented frequency; NA when absent. fineMappingPipeline gains a medianAbsCorr argument (default NULL), threaded to susie_get_cs for OR-logic credible-set purity alongside minAbsCorr. The optional PIP screen now runs after panel-vs-sumstats allele harmonization, so it operates on the harmonized variant set. Tests: update the MAF->af schema assertions and add coverage for af passthrough, medianAbsCorr OR-logic, and the PIP-screen ordering. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The CI's conda-forge susieR (CRAN build) has no median_abs_corr in susie_get_cs; guard the new OR-logic test so it runs only where susieR supports it (GitHub-HEAD) and skips otherwise. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the hand-rolled fixed-ridge conditional with susieR's kriging RSS diagnostic: estimate the LD-mismatch scale via estimate_s_rss() and take the per-variant conditional distribution from kriging_rss(), flagging outliers on its standardized residual. krigingOutlierQc now takes n (threaded from the QC call site) and errors clearly when susieR lacks the diagnostic; ridge is gone. Better calibrated than the fixed ridge, which over-flagged in the tails (chr21 reference: 28 -> 8 flagged, the 8 a strict subset). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
top_lociexportsaf, notMAF.getTopLoci(posterior + marginal views) and the canonicalbuilder now emit an effect-allele-frequency
afcolumn. The GwasSumStats/QtlSumStats methods alsowire the QC'd entry frequency into it — it was never passed before, so the old
MAFcolumn wasalways
NA.afis the harmonized, complemented frequency;NAwhen absent.medianAbsCorris now afineMappingPipelineargument (defaultNULL), threaded tosusie_get_csfor OR-logic credible-set purity alongsideminAbsCorr.panel-aligned variant set.
No backward-compatibility shims (alpha).
Tests
Updated the
MAF→afschema assertions and added coverage for af passthrough (directional,NAwhen unsupplied),
medianAbsCorrOR-logic (admits ≥ sets;NULLno-op), and the PIP-screen ordering(an off-panel signal no longer rescues a region; screen-off is unchanged). Full affected suite green:
443 tests / 1125 expectations, 0 failures.